package com.fortune.rainshine.feign.system;

import com.fortune.rainshine.config.FeignConfig;
import com.fortune.rainshinecommon.base.MsgModel;
import com.fortune.rainshinecommon.base.ParmsModel;
import com.fortune.rainshinecommon.model.CustomerModel;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.ResponseBody;

@FeignClient(value = "rain-shine-system",configuration = FeignConfig.class)
@Controller
public interface CustomerFeign {
    @PostMapping("/customer/add")
    @ResponseBody
    MsgModel add(@RequestBody CustomerModel model);

    @PostMapping("/customer/getCustomer")
    @ResponseBody
    CustomerModel getCustomer(@RequestBody Integer customerId);

    @PostMapping("/customer/list")
    @ResponseBody
    MsgModel customerList(@RequestBody ParmsModel parms);

    @PostMapping("/customer/update")
    @ResponseBody
    MsgModel update(@RequestBody CustomerModel model);
}
